package com.easymin.weixin.common;

import java.util.regex.Pattern;

public class PhoneNumberHelper {
  
  /**
   * 验证电话号码.
   */
  
  public static boolean isPhoneNumber(String input) {
    String regex = "^\\d{1,}";
    //"(^(13[0-9]|14[0-9]|15[0-9]|17[0-9]|18[0-9])\\d{8})|
    //((400)-(\\d{3})-(\\d{4}))|((4000)-(\\d{3})-(\\d{3}))|((400)-(\\d{4})-(\\d{3}))|
    //((400)\\d{7})|(\\d{7,8})|((0)(\\d{7,10}))
    //|((\\d{3})-(\\d{7,8}))|((\\d{3,4})-(\\d{7,8})-(\\d{1,2}))$";
    return Pattern.matches(regex, input);
  }
}
